package com.mida.bms.report.controller;

import com.mida.bms.report.service.DocDefineSpaceConsumerService;
import com.mida.bms.report.vo.DocDefineSpaceConsumerVo;
import com.mida.tool.common.result.ListResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName: DocDefineSpaceConsumerController
 * @Description: 结构化模板定义空间用户控制层
 * @Author: wang xiao le
 * @Date: 2021/6/16 11:47
 **/
@RestController
@RequestMapping("/docDefineSpaceConsumer")
@CrossOrigin
@Slf4j
public class DocDefineSpaceConsumerController {

    @Autowired
    private DocDefineSpaceConsumerService docDefineSpaceConsumerService;
    /**
     * 1、根据定义空间soid查询定义空间用户信息
     *
     * @param defineSpaceSoid 定义空间soid
     * @return 定义空间用户信息集合
     */
    @GetMapping("selectConsumersByDefineSpaceSoid")
    @ResponseBody
    public ListResult<List<DocDefineSpaceConsumerVo>> selectConsumersByDefineSpaceSoid(@RequestParam("defineSpaceSoid") long defineSpaceSoid) {
        return docDefineSpaceConsumerService.selectConsumersByDefineSpaceSoid(defineSpaceSoid);
    }
}
